<?php

namespace App\Libraries\Criteria;

use App\Libraries\Entities\BaseEntity;
use Prettus\Repository\Contracts\CriteriaInterface;
use Prettus\Repository\Contracts\RepositoryInterface;

class descSortCriteria implements CriteriaInterface
{
    public function apply($model, RepositoryInterface $repository)
    {
        $model = $model->orderBy(BaseEntity::SORT, 'desc');

        return $model;
    }
}
